package com.only4play.practice.report.core.controller;

import com.only4play.codegen.support.model.JsonObject;
import com.only4play.practice.report.core.model.UploadCarInParam;
import com.only4play.practice.report.core.service.UploadCenterService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author mdy
 * * @date 2024/10/21
 */
@RestController
@RequestMapping("/upload/center")
@RequiredArgsConstructor
public class UploadCenterController {

    private final UploadCenterService uploadCenterService;


    @RequestMapping("/enableParkUpload")
    public JsonObject<Object> enableParkUpload(@RequestParam Integer reportPlatformType){

        return uploadCenterService.enableParkUpload(reportPlatformType);
    }

    @RequestMapping("/disableParkUpload")
    public JsonObject<Object> disableParkUpload(@RequestParam Integer reportPlatformType){

        return uploadCenterService.disableParkUpload(reportPlatformType);
    }

    // 车辆进场数据上报
    @RequestMapping("/disableParkUpload")
    public JsonObject<Object> carInReport(@RequestParam UploadCarInParam param){

        return uploadCenterService.carInReport(param);
    }


}
